<template>


<!-- @click="showEditDialog(scope.row.id)"  -->
    <!-- 修改角色的对话框 -->
  <el-dialog title="修改角色" :visible.sync="editDialogVisible" width="50%" @close="editDialogClosed">
<el-form> 
  <el-form-item label="角色名称">
      <el-input></el-input>
   </el-form-item>
   <el-form-item label="角色描述">
      <el-input></el-input>
    </el-form-item>
</el-form> 
      <span slot="footer" class="dialog-footer">
        <el-button @click="editDialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="editUserInfo">确 定</el-button>
      </span>
    </el-dialog>

</template>

<script>
export default {
data() {
  return {
        //当前即将分配权限的角色id
      roleId:'',
      //控制修改用户对话框的显示与隐藏
      editDialogVisible:false,
  },methods: {
     editUserInfo(){
      this.editDialogVisible =false
    },
    //展示编辑角色对话框
   showEditDialog(id){
    const {data:res} = this.$http.get('roles/' + id)
    if(res.meta.status !==200) {
      return this.$message.error('查询用户信息失败！')
    }
      this.editFom = res.data
      this.editDialogVisible = true
    },
  },
},
}
</script>

<style>

</style>